﻿#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
//#include <windows.h>
//int main()
//{
//	char arr1[] = "welcome to LanZhou!!!";
//	char arr2[] = "#####################";
//	int left = 0;
//	int sz = sizeof(arr1) / sizeof(arr1[0]);
//	int right = sz - 2;
//	for (left = 0, right = sz - 2; left <= right; left++, right--)
//	{
//		arr2[left] = arr1[left];
//		arr2[right] = arr1[right];
//		printf("%s", arr2);
//		Sleep(400);
//		system("cls");
//	}
//	printf("%s", arr2);
//	return 0;
//}




//关机程序
#include <string.h>
#include <stdlib.h>
int main()
{
	char arr[60] = { 0 };
	system("shutdown -s -t 60");
		while (1)
		{
			printf("请注意，您的电脑将在60秒内关机，输入我是猪，则取消关机!\n");
			scanf("%s", arr);
			if (strcmp(arr, "我是猪") == 0)
			{
				system("shutdown -a");
				break;
			}
		}
	return 0;
}